Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Delivered Public Key Certificates #592

Merged
merged 12 commits into from
Dec 22, 2023

Conversation

mandelsoft
Copy link
Contributor

@mandelsoft mandelsoft commented Nov 25, 2023

Description

Support for Public Key certificates has been added, the certificates are published together with the component version
as part of the signature.

If a signature validation is done a public key can be omitted now, if the signature contains a valid
certificate chain for a public key certificate. Additionally to the chain validation the Issuer (Distinguished Name) is checked
for the the public key certificate.

With a dedicated option (--tsa) a signed timestamp (TSA) is stored along with the signature, which is used (if set)
to specify the verification time for the certificate chain. A signature is only accepted if the certificate chai can be verified
for the signing time and the timestamp can be verified.

The commands have been extended to

  • create such certificates
  • pass appropriate issuer and root certificate information to validate the public key certificate.
    Internally the the issuer has been migrated from a string to a pkix.Name.
    The DN match checks for the existence of given attributes in the public key certificate.
  • options for TSA support

The config has been extended to define expected issuers for signature names and a TSA server URL.

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • 🔁 CI
  • 📦 Chore (Release)
  • ⏩ Revert

Related Tickets & Documents

Screenshots

Added tests?

  • 👍 yes
  • 🙅 no, because they aren't needed
  • 🙋 no, because I need help
  • Separate ticket for tests # (issue/pr)

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

Added to documentation?

  • 📜 README.md
  • 🙅 no documentation needed

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

@mandelsoft mandelsoft force-pushed the signing branch 3 times, most recently from 7c4be37 to a057e4d Compare November 30, 2023 16:15
@mandelsoft mandelsoft force-pushed the signing branch 2 times, most recently from 898fac5 to e914fb3 Compare December 2, 2023 13:54

type Usages []interface{}

// Specification specified the xontext for the certificate creation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typos

Suggested change
// Specification specified the xontext for the certificate creation.
// Specification specifies the context for the certificate creation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed


PublicKey GenericPublicKey

// CAPrivateKey is the provate key used for signing.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

Suggested change
// CAPrivateKey is the provate key used for signing.
// CAPrivateKey is the private key used for signing.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed

@mandelsoft mandelsoft force-pushed the signing branch 2 times, most recently from 1c53a98 to 37e0aaa Compare December 21, 2023 14:30
@mandelsoft mandelsoft merged commit 5ca4493 into open-component-model:main Dec 22, 2023
10 of 12 checks passed
@mandelsoft mandelsoft deleted the signing branch December 22, 2023 14:08
@mandelsoft mandelsoft restored the signing branch December 22, 2023 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Signing: support for organization validated public key certificates delivered together with the signature.
2 participants